package com.sundhage.gui
{
	import flash.display.*;
	import flash.events.*;
	import flash.utils.*;
	
	public class JSFormAssets extends JSAssets {
		private var background:BitmapData;
		public function getBackground():BitmapData { return bmpCopy(background); }
		public function hasBackground():Boolean { if (background) return true; else return false; }
		
		private var okBtn:*;
		public function getOkBtn():* { return copy(okBtn); }
		
		private var cancelBtn:*;
		public function getCancelBtn():* { return copy(cancelBtn); }
		
		private var busy:JSBusy;
		public function getBusy():JSBusy { return busy; }
		
		public function JSFormAssets(o:Object, busy:JSBusy=null) {
			this.busy = busy;
		
			for (var prop:* in o) {
				try {
					var d:* = o[prop];
					if (getQualifiedClassName(d) == "flash.display::BitmapData" || getQualifiedSuperclassName(d) == "flash.display::BitmapData")
						this[prop] = bmpCopy(o[prop]);
					else
						this[prop] = copy(o[prop]);
				} catch (e:Error) {
					trace("JSFormAssets::constructor -> property "+prop+" does not exist.");
				}
			}
			
		}
		
	}
}